3.2.24 \(\int \frac {c+d x^2+e x^4+f x^6}{x^2 (a+b x^2)^2} \, dx\)

Optimal. Leaf size=112 \[ -\frac {x \left (-\frac {a^2 f}{b^2}+\frac {b c}{a}+\frac {a e}{b}-d\right )}{2 a \left (a+b x^2\right )}-\frac {c}{a^2 x}-\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (3 a^3 f-a^2 b e-a b^2 d+3 b^3 c\right )}{2 a^{5/2} b^{5/2}}+\frac {f x}{b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1805, 1261, 205} \begin {gather*} -\frac {x \left (-\frac {a^2 f}{b^2}+\frac {b c}{a}+\frac {a e}{b}-d\right )}{2 a \left (a+b x^2\right )}-\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (-a^2 b e+3 a^3 f-a b^2 d+3 b^3 c\right )}{2 a^{5/2} b^{5/2}}-\frac {c}{a^2 x}+\frac {f x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^2),x]

[Out]

-(c/(a^2*x)) + (f*x)/b^2 - (((b*c)/a - d + (a*e)/b - (a^2*f)/b^2)*x)/(2*a*(a + b*x^2)) - ((3*b^3*c - a*b^2*d -
 a^2*b*e + 3*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(5/2)*b^(5/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1261

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] &&
 NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 1805

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[(c*x)^m*Pq,
 a + b*x^2, x], f = Coeff[PolynomialRemainder[(c*x)^m*Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[
(c*x)^m*Pq, a + b*x^2, x], x, 1]}, Simp[((a*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*
(p + 1)), Int[(c*x)^m*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*(p + 1)*Q)/(c*x)^m + (f*(2*p + 3))/(c*x)^m, x], x],
 x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && ILtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{x^2 \left (a+b x^2\right )^2} \, dx &=-\frac {\left (\frac {b c}{a}-d+\frac {a e}{b}-\frac {a^2 f}{b^2}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \frac {-2 c+\left (\frac {b c}{a}-d-\frac {a e}{b}+\frac {a^2 f}{b^2}\right ) x^2-\frac {2 a f x^4}{b}}{x^2 \left (a+b x^2\right )} \, dx}{2 a}\\ &=-\frac {\left (\frac {b c}{a}-d+\frac {a e}{b}-\frac {a^2 f}{b^2}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 a f}{b^2}-\frac {2 c}{a x^2}+\frac {3 b^3 c-a b^2 d-a^2 b e+3 a^3 f}{a b^2 \left (a+b x^2\right )}\right ) \, dx}{2 a}\\ &=-\frac {c}{a^2 x}+\frac {f x}{b^2}-\frac {\left (\frac {b c}{a}-d+\frac {a e}{b}-\frac {a^2 f}{b^2}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\left (3 b^3 c-a b^2 d-a^2 b e+3 a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{2 a^2 b^2}\\ &=-\frac {c}{a^2 x}+\frac {f x}{b^2}-\frac {\left (\frac {b c}{a}-d+\frac {a e}{b}-\frac {a^2 f}{b^2}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\left (3 b^3 c-a b^2 d-a^2 b e+3 a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 115, normalized size = 1.03 \begin {gather*} -\frac {c}{a^2 x}+\frac {x \left (a^3 f-a^2 b e+a b^2 d-b^3 c\right )}{2 a^2 b^2 \left (a+b x^2\right )}-\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (3 a^3 f-a^2 b e-a b^2 d+3 b^3 c\right )}{2 a^{5/2} b^{5/2}}+\frac {f x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^2),x]

[Out]

-(c/(a^2*x)) + (f*x)/b^2 + ((-(b^3*c) + a*b^2*d - a^2*b*e + a^3*f)*x)/(2*a^2*b^2*(a + b*x^2)) - ((3*b^3*c - a*
b^2*d - a^2*b*e + 3*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(5/2)*b^(5/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {c+d x^2+e x^4+f x^6}{x^2 \left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^2),x]

[Out]

IntegrateAlgebraic[(c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^2), x]

________________________________________________________________________________________

fricas [A]  time = 1.02, size = 354, normalized size = 3.16 \begin {gather*} \left [\frac {4 \, a^{3} b^{2} f x^{4} - 4 \, a^{2} b^{3} c - 2 \, {\left (3 \, a b^{4} c - a^{2} b^{3} d + a^{3} b^{2} e - 3 \, a^{4} b f\right )} x^{2} - {\left ({\left (3 \, b^{4} c - a b^{3} d - a^{2} b^{2} e + 3 \, a^{3} b f\right )} x^{3} + {\left (3 \, a b^{3} c - a^{2} b^{2} d - a^{3} b e + 3 \, a^{4} f\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{4 \, {\left (a^{3} b^{4} x^{3} + a^{4} b^{3} x\right )}}, \frac {2 \, a^{3} b^{2} f x^{4} - 2 \, a^{2} b^{3} c - {\left (3 \, a b^{4} c - a^{2} b^{3} d + a^{3} b^{2} e - 3 \, a^{4} b f\right )} x^{2} - {\left ({\left (3 \, b^{4} c - a b^{3} d - a^{2} b^{2} e + 3 \, a^{3} b f\right )} x^{3} + {\left (3 \, a b^{3} c - a^{2} b^{2} d - a^{3} b e + 3 \, a^{4} f\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{2 \, {\left (a^{3} b^{4} x^{3} + a^{4} b^{3} x\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/4*(4*a^3*b^2*f*x^4 - 4*a^2*b^3*c - 2*(3*a*b^4*c - a^2*b^3*d + a^3*b^2*e - 3*a^4*b*f)*x^2 - ((3*b^4*c - a*b^
3*d - a^2*b^2*e + 3*a^3*b*f)*x^3 + (3*a*b^3*c - a^2*b^2*d - a^3*b*e + 3*a^4*f)*x)*sqrt(-a*b)*log((b*x^2 + 2*sq
rt(-a*b)*x - a)/(b*x^2 + a)))/(a^3*b^4*x^3 + a^4*b^3*x), 1/2*(2*a^3*b^2*f*x^4 - 2*a^2*b^3*c - (3*a*b^4*c - a^2
*b^3*d + a^3*b^2*e - 3*a^4*b*f)*x^2 - ((3*b^4*c - a*b^3*d - a^2*b^2*e + 3*a^3*b*f)*x^3 + (3*a*b^3*c - a^2*b^2*
d - a^3*b*e + 3*a^4*f)*x)*sqrt(a*b)*arctan(sqrt(a*b)*x/a))/(a^3*b^4*x^3 + a^4*b^3*x)]

________________________________________________________________________________________

giac [A]  time = 0.36, size = 122, normalized size = 1.09 \begin {gather*} \frac {f x}{b^{2}} - \frac {{\left (3 \, b^{3} c - a b^{2} d + 3 \, a^{3} f - a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b^{2}} - \frac {3 \, b^{3} c x^{2} - a b^{2} d x^{2} - a^{3} f x^{2} + a^{2} b x^{2} e + 2 \, a b^{2} c}{2 \, {\left (b x^{3} + a x\right )} a^{2} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^2,x, algorithm="giac")

[Out]

f*x/b^2 - 1/2*(3*b^3*c - a*b^2*d + 3*a^3*f - a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2*b^2) - 1/2*(3*b^3*c
*x^2 - a*b^2*d*x^2 - a^3*f*x^2 + a^2*b*x^2*e + 2*a*b^2*c)/((b*x^3 + a*x)*a^2*b^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 165, normalized size = 1.47 \begin {gather*} \frac {a f x}{2 \left (b \,x^{2}+a \right ) b^{2}}-\frac {3 a f \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b^{2}}+\frac {d x}{2 \left (b \,x^{2}+a \right ) a}+\frac {d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a}-\frac {b c x}{2 \left (b \,x^{2}+a \right ) a^{2}}-\frac {3 b c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a^{2}}-\frac {e x}{2 \left (b \,x^{2}+a \right ) b}+\frac {e \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {f x}{b^{2}}-\frac {c}{a^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^2,x)

[Out]

f*x/b^2+1/2*a/b^2*x/(b*x^2+a)*f-1/2/b*x/(b*x^2+a)*e+1/2/a*x/(b*x^2+a)*d-1/2/(b*x^2+a)/a^2*b*c*x-3/2*a/b^2/(a*b
)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*f+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*e+1/2/a/(a*b)^(1/2)*arctan(1/(
a*b)^(1/2)*b*x)*d-3/2/(a*b)^(1/2)/a^2*b*c*arctan(1/(a*b)^(1/2)*b*x)-1/a^2*c/x

________________________________________________________________________________________

maxima [A]  time = 2.99, size = 117, normalized size = 1.04 \begin {gather*} -\frac {2 \, a b^{2} c + {\left (3 \, b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} x^{2}}{2 \, {\left (a^{2} b^{3} x^{3} + a^{3} b^{2} x\right )}} + \frac {f x}{b^{2}} - \frac {{\left (3 \, b^{3} c - a b^{2} d - a^{2} b e + 3 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/x^2/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

-1/2*(2*a*b^2*c + (3*b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x^2)/(a^2*b^3*x^3 + a^3*b^2*x) + f*x/b^2 - 1/2*(3*b^3*
c - a*b^2*d - a^2*b*e + 3*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a^2*b^2)

________________________________________________________________________________________

mupad [B]  time = 1.00, size = 112, normalized size = 1.00 \begin {gather*} \frac {f\,x}{b^2}-\frac {\frac {x^2\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+3\,c\,b^3\right )}{2\,a^2}+\frac {b^2\,c}{a}}{b^3\,x^3+a\,b^2\,x}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (3\,f\,a^3-e\,a^2\,b-d\,a\,b^2+3\,c\,b^3\right )}{2\,a^{5/2}\,b^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(x^2*(a + b*x^2)^2),x)

[Out]

(f*x)/b^2 - ((x^2*(3*b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(2*a^2) + (b^2*c)/a)/(b^3*x^3 + a*b^2*x) - (atan((b^(
1/2)*x)/a^(1/2))*(3*b^3*c + 3*a^3*f - a*b^2*d - a^2*b*e))/(2*a^(5/2)*b^(5/2))

________________________________________________________________________________________

sympy [A]  time = 9.46, size = 197, normalized size = 1.76 \begin {gather*} \frac {\sqrt {- \frac {1}{a^{5} b^{5}}} \left (3 a^{3} f - a^{2} b e - a b^{2} d + 3 b^{3} c\right ) \log {\left (- a^{3} b^{2} \sqrt {- \frac {1}{a^{5} b^{5}}} + x \right )}}{4} - \frac {\sqrt {- \frac {1}{a^{5} b^{5}}} \left (3 a^{3} f - a^{2} b e - a b^{2} d + 3 b^{3} c\right ) \log {\left (a^{3} b^{2} \sqrt {- \frac {1}{a^{5} b^{5}}} + x \right )}}{4} + \frac {- 2 a b^{2} c + x^{2} \left (a^{3} f - a^{2} b e + a b^{2} d - 3 b^{3} c\right )}{2 a^{3} b^{2} x + 2 a^{2} b^{3} x^{3}} + \frac {f x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/x**2/(b*x**2+a)**2,x)

[Out]

sqrt(-1/(a**5*b**5))*(3*a**3*f - a**2*b*e - a*b**2*d + 3*b**3*c)*log(-a**3*b**2*sqrt(-1/(a**5*b**5)) + x)/4 -
sqrt(-1/(a**5*b**5))*(3*a**3*f - a**2*b*e - a*b**2*d + 3*b**3*c)*log(a**3*b**2*sqrt(-1/(a**5*b**5)) + x)/4 + (
-2*a*b**2*c + x**2*(a**3*f - a**2*b*e + a*b**2*d - 3*b**3*c))/(2*a**3*b**2*x + 2*a**2*b**3*x**3) + f*x/b**2

________________________________________________________________________________________